<script type="text/javascript" charset="utf-8">
    $().ready(function() {
        elRTE.prototype.options.panels.web2pyPanel = [
            'bold', 'italic', 'underline', 'subscript','superscript','forecolor', 'justifyleft', 'justifyright',
            'justifycenter', 'justifyfull', 'formatblock','fontsize', 'insertorderedlist', 'insertunorderedlist',
            'link'
        ];
        elRTE.prototype.options.toolbars.web2pyToolbar = ['web2pyPanel', 'tables'];
        
        var opts = {
            cssClass : 'el-rte',
             lang     : 'es',
            height   : 450,
            toolbar  : 'web2pyToolbar',
            cssfiles : ["<?php echo $this->Html->url('/css/elrte.min.css', true); ?>"]
            
           
            
            
        }
        
        $('#editor').elrte(opts);
        $('#editor').elrte('val', '<?php echo $this->data['Account']['formato_retencion'] ?>');
         $('#boton').click(function(){
              $('#area').attr('value', $('#editor').elrte('val'));
              
         });
       
    }
    
    
    
    )
</script>
<div id="editor"></div>

    <?php
    echo $this->Form->create('Account');

    echo $this->Form->hidden("Account.id", array('type' => 'text'));
    echo $this->Form->hidden("Account.contract_id", array('type' => 'text'));
    echo $this->Form->hidden("Account.formato_retencion", array('id' => 'area', "rows" => "15", "cols" => "80"));

    //echo $this->Form->input("Account.formato_retencion", array('id'=>'campo',"rows" => "15", "cols" => "80"));
    echo $this->Ajax->submit('Guardar', array('id' => 'boton', 'url' => array('controller' => 'Accounts', 'action' => 'edit_retention', $this->data['Account']['id']), 'update' => 'content', 'indicator' => 'loading'));

    echo $this->Form->end();
    ?>
<?php echo $this->Ajax->link($this->Html->image("regresar.gif", array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar')), array('controller' => "Accounts", "action" => "index", $this->Session->read('contrato')), array('update' => 'content', 'indicator' => 'loading', 'escape' => false), null) ?>
